home *** CD-ROM | disk | FTP | other *** search
- /* curs.c */
-
- /* JOVE/MSDOS. K. Mitchum 1/85 */
- /* Modifications for personal use only. */
- /* original code J. Payne LSRHS 5/83 */
- /* Ken Mitchum */
- /* University of Pittsburgh */
- /* Decision Systems Laboratory */
-
- /*
- Jonathan Payne at Lincoln-Sudbury Regional High School 5-25-83
-
- jove_curs.c
-
- The cursor optimization happens here. You may decide that this
- is going too far with cursor optimization, or perhaps it should
- limit the amount of checking to when the output speed is slow.
- What ever turns you on ... */
-
-
- #define JOVE_TERM
-
- #include "jove.h"
- #include "tm.h"
- #include "screen.h"
-
-
- extern int phystab;
- extern int InMode;
-
- #ifdef TERMCAP
- #include "termcap.h"
-
- struct cursaddr {
- int c_numchars,
- (*c_func)();
- };
- struct cursaddr DirectMin;
-
- char *Cmstr;
- #endif
-
- InitCM()
- {
- return;
- }
-
-
- DoPlacur(line,col)
- int line,col;
- {
- if (line == CapLine && col == CapCol)
- return; /* We are already there. */
-
- if (InMode) {
- ex_ins_mode();
- InMode = 0;
- }
- #ifdef TERMCAP
- Cmstr = tgoto(CM,col,line);
- GoDirect(line,col);
- #else
- (*tt.t_topos) (line,col);
- #endif
- CapLine = line;
- CapCol = col;
-
- return;
- }
-
-
- writechars(start,end)
- char *start, *end;
- {
- (*tt.t_writechars) (start,end);
- return;
- }
-
-
- /*----------------------------o.s. dependent-------------------------*/
- /* end */
-
- #ifdef TERMCAP
- GoDirect(line, col)
- register int line,
- col;
- {
- putpad(Cmstr, 1), CapLine = line, CapCol = col;
- }
- #endif